


<div class="pPersonal-warp">
	
	 <div class="pPersonal-tijiao">
        <a href="javascript:;" class="t-btn" onclick="duoxuan()">提交订单</a>
    </div>
	
    <ul class="pplay-list">

        <li>
            <div class="time fl">
                <p class="p1">9:00-10:00</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['am'] : '预付金额' }</p>
            </div>

            <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>

            <if condition="($times.1.time lt $now_time) OR ($times.1.count neq 0)">
                    <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                    <div class="arge">
                        <input type="checkbox" name="more" id="more1" value="9:00-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }-{$amount['am']}" data-id="9:00" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }">
                        <label for="more1"></label>
                    </div>
                    <a href="javascript:;" class="yud" data-id="9:00" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }-{$amount['am']}" onclick="reserve(this)" >可预约</a>
            </if>
        </li>
        
        <li>
            <div class="time fl">
                <p class="p1">10:05-11:05</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['am'] : '预付金额' }</p>
            </div>
            
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            
            <if condition="($times.2.time lt $now_time) OR ($times.2.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more2" value="10:05-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }-{$amount['am']}" data-id="10:05" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }">
                    <label for="more2"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="10:05" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }-{$amount['am']}" onclick="reserve(this)" >可预约</a>
            </if>
            
             </li>
        <li>
        <div class="time fl">
            <p class="p1">11:10-12:10</p>
            <p class="p2">周期时间1小时</p>
        </div>
        <div class="price fr">
            <p class="c-orange">
                ￥
                <strong>
                    {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }
                </strong>
            </p>
            <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['am'] : '预付金额' }</p>
        </div>
        
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            
            <if condition="($times.3.time lt $now_time) OR ($times.3.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more3" value="11:10-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }-{$amount['am']}" data-id="11:10" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }">
                    <label for="more3"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="11:10" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['am'] }-{$amount['am']}" onclick="reserve(this)" >可预约</a>
            </if>
            
         </li>

        <li>
            <div class="time fl">
                <p class="p1">12:15-13:15</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['pm'] : '预付金额' }</p>
            </div>
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            
            <if condition="($times.4.time lt $now_time) OR ($times.4.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more4" value="12:15-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" data-id="12:15" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }">
                    <label for="more4"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="12:15" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" onclick="reserve(this)" >可预约</a>
            </if>
             </li>

        <li>
            <div class="time fl">
                <p class="p1">13:20-14:20</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['pm'] : '预付金额' }</p>
            </div>
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            
            <if condition="($times.5.time lt $now_time) OR ($times.5.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more5" value="13:20-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" data-id="13:20" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }">
                    <label for="more5"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="13:20" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" onclick="reserve(this)" >可预约</a>
            </if>
             </li>

        <li>
            <div class="time fl">
                <p class="p1">14:25-15:25</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['pm'] : '预付金额' }</p>
            </div>
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            <if condition="($times.6.time lt $now_time) OR ($times.6.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more6" value="14:25-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" data-id="14:25" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }">
                    <label for="more6"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="14:25" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" onclick="reserve(this)" >可预约</a>
            </if>
             </li>

        <li>
            <div class="time fl">
                <p class="p1">15:30-16:30</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['pm'] : '预付金额' }</p>
            </div>
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            <if condition="($times.7.time lt $now_time) OR ($times.7.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more7" value="15:30-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" data-id="15:30" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }">
                    <label for="more7"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="15:30" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" onclick="reserve(this)" >可预约</a>
            </if>
             </li>

        <li>
            <div class="time fl">
                <p class="p1">16:35-17:35</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['pm'] : '预付金额' }</p>
            </div>
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            <if condition="($times.8.time lt $now_time) OR ($times.8.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more8" value="16:35-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" data-id="16:35" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }">
                    <label for="more8"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="16:35" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" onclick="reserve(this)" >可预约</a>
            </if>
             </li>


        <li>
            <div class="time fl">
                <p class="p1">17:40-18:40</p>
                <p class="p2">周期时间1小时</p>
            </div>
            <div class="price fr">
                <p class="c-orange">
                    ￥
                    <strong>
                        {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }
                    </strong>
                </p>
                <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['pm'] : '预付金额' }</p>
            </div>
            <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
            <if condition="($times.9.time lt $now_time) OR ($times.9.count neq 0)">
                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                <else/>
                <div class="arge">
                    <input type="checkbox" name="more" id="more9" value="17:40-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" data-id="17:40"  data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }">
                    <label for="more9"></label>
                </div>
                <a href="javascript:;" class="yud" data-id="17:40"  data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['pm'] }-{$amount['pm']}" onclick="reserve(this)" >可预约</a>
            </if>
            </li>



            <li>
                <div class="time fl">
                    <p class="p1">18:45-19:45</p>
                    <p class="p2">周期时间1小时</p>
                </div>

                <div class="price fr">
                    <p class="c-orange">
                        ￥
                        <strong>
                            {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }
                        </strong>
                    </p>
                    <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['en'] : '预付金额' }</p>
                </div>


                <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->
                <if condition="($times.10.time lt $now_time) OR ($times.10.count neq 0)">
                    <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                    <else/>
                    <div class="arge">
                        <input type="checkbox" name="more" id="more10" value="18:45- {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }-{$amount['en']}" data-id="18:45"  data-price=" {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }">
                        <label for="more10"></label>
                    </div>
                    <a href="javascript:;" class="yud" data-id="18:45"  data-price=" {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }-{$amount['en']}" onclick="reserve(this)" >可预约</a>
                </if>
            </li>



            <li>
                <div class="time fl">
                    <p class="p1">19:50-20:50</p>
                    <p class="p2">周期时间1小时</p>
                </div>

                <div class="price fr">
                    <p class="c-orange">
                        ￥
                        <strong>
                            {:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }
                        </strong>
                    </p>
                    <p class="p2">  {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['en'] : '预付金额' }</p>
                </div>



                <!--<a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->

                <if condition="($times.11.time lt $now_time) OR ($times.11.count neq 0)">
                    <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                    <else/>
                    <div class="arge">
                        <input type="checkbox" name="more" id="more11" value="19:50-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }-{$amount['en']}" data-id="19:50" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }">
                        <label for="more11"></label>
                    </div>
                    <a href="javascript:;" class="yud" data-id="19:50" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }-{$amount['en']}" onclick="reserve(this)">可预约</a>
                </if>
               </li>

            <li>
                <div class="time fl">
                    <p class="p1">20:55-21:55</p>
                    <p class="p2">周期时间1小时</p>
                </div>
                <div class="price fr">
                    <p class="c-orange">￥<strong>{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }</strong></p>
                    <p class="p2"> {:strtotime($user.vip_time) > time() && $user.vip ? '￥ '.$amount['en'] : '预付金额' }</p>
                </div>
<!--                <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>-->

                    <if condition="($times.12.time lt $now_time) OR ($times.12.count neq 0)">
                        <a href="javascript:;" class="yud" style="background: #B2B2B2;">已预约</a>
                    <else/>
                        <div class="arge">
                            <input type="checkbox" name="more" id="more12" value="20:55-{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }-{$amount['en']}" data-id="20:55" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }">
                            <label for="more12"></label>
                        </div>
                        <a href="javascript:;" class="yud" data-id="20:55" data-price="{:strtotime($user.vip_time) > time() && $user.vip ? $amount['vip'] : $amount['en'] }-{$amount['en']}" onclick="reserve(this)">可预约</a>
                    </if>
                </li>
    </ul>

    <div class="pPersonal-tijiao">
        <a href="javascript:;" class="t-btn" onclick="duoxuan()">提交订单</a>
    </div>

</div>

<script>
    var swiper = new Swiper('.pFill-pup-coach', {

        slidesPerView:4.5,

        observer:true,//修改swiper自己或子元素时，自动初始化swiper==

        observeParents:true,//修改swiper的父元素时，自动初始化swiper

    });

    $(function () {
        $(".pFill-pup .close,.pFill-marsk").click(function () {
            $(".pFill-marsk").hide();
            $(".pFill-pup").hide();
            $('html').css({"overflow-y":"auto"});
        });
    })

    //单选提交
    function reserve(obj) {
        var id = $(obj).attr('data-id');
        var amount = $(obj).attr('data-price');
        $('#subscribe-time').html(id);
        $('#subscribe-price').html(amount);
        $('#yd_price').val(amount);
        $('#yd_time').val(id);
        $('#duoxuan').val(''); //多选
        $(".pFill-marsk").show();
        $(".pFill-pup").show();
        $('html').css({"overflow-y":"hidden"});
    }

    //多选提交
    function duoxuan(){
        var length = $("input[type='checkbox']:checked").length;
        if (length == 0) {
            layer.msg('请先选择时间后提交', {icon: 2, time: 2000});
        }else{
            var first = $("input:checkbox[name=more]:checked").first();

            $('#subscribe-time').html(first.attr('data-id')); //开球时间 - 时分
            $('#subscribe-long').html('共计'+length+'小时'); //开球时间 - 时长

            var price_count = 0;
            var duoxuan = '';
            $("input:checkbox[name=more]:checked").each(function(){
                var price = $(this).attr('data-price');
                price_count = price_count + Number(price);
                duoxuan += $(this).val() +",";
            });
            $('#subscribe-price').html(price_count.toFixed(2));
            $('#yd_price').val(price_count); //总价格
            $('#yd_time').val(first.attr('data-id')); //开球时间
            $('#duoxuan').val(duoxuan); //多选

            $(".pFill-marsk").show();
            $(".pFill-pup").show();
            $('html').css({"overflow-y":"hidden"});
        }



    }



</script>